package com.onedec.designer.service.impl;

import com.onedec.designer.entity.OnedecProjectDesignMaterials;
import com.onedec.designer.mapper.OnedecProjectDesignMaterialsMapper;
import com.onedec.designer.service.OnedecProjectDesignMaterialsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class OnedecProjectDesignMaterialsServiceImpl implements OnedecProjectDesignMaterialsService {
    @Autowired
    private OnedecProjectDesignMaterialsMapper onedecProjectDesignMaterialsMapper;

    @Override
    public List<Map<String, Object>> selectByMap(Map<String, Object> map) {
        return onedecProjectDesignMaterialsMapper.selectByMap(map);
    }

    @Override
    public long accountnum() {
        return onedecProjectDesignMaterialsMapper.countByExample(null);
    }

    @Override
    public void deleteById(int id) {
        onedecProjectDesignMaterialsMapper.deleteByPrimaryKey(id);
    }


    @Override
    public void insertOne(OnedecProjectDesignMaterials onedecProjectDesignMaterials) {
        onedecProjectDesignMaterialsMapper.insertSelective(onedecProjectDesignMaterials);
    }

    @Override
    public OnedecProjectDesignMaterials selectById(int id) {
        return onedecProjectDesignMaterialsMapper.selectByPrimaryKey(id);
    }

    @Override
    public void update(OnedecProjectDesignMaterials onedecProjectDesignMaterials) {
        onedecProjectDesignMaterialsMapper.updateByPrimaryKeySelective(onedecProjectDesignMaterials);
    }


}
